package com.sc.VenusQueryBeta.ui.fragments.hotel.child.tabs;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;
import android.webkit.WebView;

import com.hengjun.kingstar.sdk.base.fragment.BaseCompatFragment;
import com.hengjun.kingstar.sdk.utils.HtmlUtils;
import com.sc.VenusQueryBeta.R;
import com.sc.VenusQueryBeta.api.Host;
import com.sc.VenusQueryBeta.constant.Constants;
import com.sc.VenusQueryBeta.model.bean.home.OverSeasBean;

import butterknife.BindView;

/**
 * Created by Administrator on 2018/11/9.
 */

public class VisaFragment extends BaseCompatFragment {
    @BindView(R.id.webView)
    WebView webView;
    private OverSeasBean listBean;

    @Override
    public int getLayoutId() {
        return R.layout.layout_visa;
    }

    @Override
    public void initUI(View view, @Nullable Bundle savedInstanceState) {
        if (listBean.getData() != null) {
            webView.loadDataWithBaseURL(Host.Host, listBean.getData().getVisaInfo(), HtmlUtils.MIME_TYPE, HtmlUtils.ENCODING, null);
        }
    }

    public static VisaFragment newInstance() {
        return new VisaFragment();
    }

    @Override
    public void getBundle(Bundle bundle) {
        if (bundle != null) {
            listBean = (OverSeasBean) bundle.getSerializable(Constants.VIP_CLUB_LIST3);

//            ToastUtils.showToast(listBean.getClubName());
        } else {
//            ToastUtils.showToast("null");
        }
    }
}
